<template>
  <svg
    aria-hidden="true"
    :class="props.class"
    :width="props.size"
    :height="props.size"
    :style="{ color: props.color }"
  >
    <use :xlink:href="symbolId" rel="external nofollow" :fill="props.color" />
  </svg>
</template>

<script setup lang="ts">
import { computed } from 'vue'
const props = defineProps({
  prefix: {
    type: String,
    default: 'icon',
  },
  name: {
    type: String,
    required: true,
  },
  color: {
    type: String,
    default: '',
  },
  size: {
    type: String,
    default: '1em',
  },
  class: {
    type: String,
    default: 'icon-svg',
  },
})
const symbolId = computed(() => `#${props.prefix}-${props.name}`)
</script>
<style lang="scss" scoped></style>
